import request from '@/config/axios'

// 商家认证日志 VO
export interface BusinessUserLogVO {
  id: number // 日志主键
  userId: number // 用户编号
  beforeStatus: number // 操作前状态
  afterStatus: number // 操作后状态
  operateType: number // 操作类型
  content: string // 操作内容
}

// 商家认证日志 API
export const BusinessUserLogApi = {
  // 查询商家认证日志分页
  getBusinessUserLogPage: async (params: any) => {
    return await request.get({ url: `/wine/business-user-log/page`, params })
  },

  // 查询商家认证日志详情
  getBusinessUserLog: async (id: number) => {
    return await request.get({ url: `/wine/business-user-log/get?id=` + id })
  },

  // 新增商家认证日志
  createBusinessUserLog: async (data: BusinessUserLogVO) => {
    return await request.post({ url: `/wine/business-user-log/create`, data })
  },

  // 修改商家认证日志
  updateBusinessUserLog: async (data: BusinessUserLogVO) => {
    return await request.put({ url: `/wine/business-user-log/update`, data })
  },

  // 删除商家认证日志
  deleteBusinessUserLog: async (id: number) => {
    return await request.delete({ url: `/wine/business-user-log/delete?id=` + id })
  },

  // 导出商家认证日志 Excel
  exportBusinessUserLog: async (params) => {
    return await request.download({ url: `/wine/business-user-log/export-excel`, params })
  }
}